{extend name="index/index"/}

{block name="body"}
<script language="javascript">
    $(document).ready(common_obj.form_submit);
</script>

<header class="tab-head">
    <ul class="nav nav-tabs">
        <li class="">
            <a href="{:url('Account/account')}">账号列表</a>
        </li>

        <li class="active">
            <a href="{:url('Account/accountadd')}">添加账号</a>
        </li>
    </ul>
</header>

<section class="wrapper" style="margin-top:0">
    <div class="row">
        <div class="col-lg-12">
            <section class="panel">
                <div class="panel-body">
                    <div class="form">
                        <form class="cmxform form-horizontal tasi-form" id="data-form">

                            <div class="form-group">
                                <label class="control-label col-lg-2">用户名</label>
                                <div class="col-lg-10">
                                    <input class="form-control" type="text" name="username" required="required" value="{$data.username}"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label col-lg-2">密码</label>
                                <div class="col-lg-10">
                                    <input class="form-control" type="password" name="password" {if condition ="$data['id'] eq ''"}required="required"{/if}/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label col-lg-2">确认密码</label>
                                <div class="col-lg-10">
                                    <input class="form-control" type="password" name="repassword" {if condition ="$data['id'] eq ''"}required="required"{/if}/>
                                </div>
                            </div>
                            <input type="hidden" name="type" value="1">
                            <input type="hidden" name="id" value="{$data.id}">

                            <div class="form-group">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <input class="btn btn-danger" type="submit" value="提交保存">
                                </div>
                            </div>
                        </form>
                        <input type="hidden" id="do_action" value="{:url('Account/accountadd')}">
                    </div>
                </div>
            </section>
        </div>
    </div>
</section>
{/block}